#include "junix.h"

int
main(int argc, char **argv){
    struct servent *pse;
    pse = getservbyname(argv[1],argv[2]);

    if(!pse)
        err_quit("Not found");

    fprintf(stdout, "s_name:%s\n", pse->s_name);
    char **pa = pse->s_aliases;

    while(*pa)
    {
        fprintf(stdout, "s_aliases:%s\n", *pa++);
    }

    printf("s_port: %d\n", pse->s_port);
    printf("s_proto:%s\n", pse->s_proto);
    
    
    exit(0);
}

